<?php

declare(strict_types=1);

namespace App\CustHub\Request;

use Mine\MineFormRequest;

class WordGroupRequest extends MineFormRequest
{
    public function addGroupRules(): array
    {
        return [
            'title' => 'required',
            'is_personal' => 'required|in:0,1',
            'cs_id' => 'required_if:is_personal,1'
        ];
    }

    public function editGroupRules(): array
    {
        return array_merge(['id' => 'required'], $this->addGroupRules());
    }

    public function deleteGroupRules(): array
    {
        return [
            'id' => 'required'
        ];
    }
}